package com.java.base.exercise.current.selfcache.imooccache2;

import java.io.IOException;
import java.util.concurrent.ExecutionException;

/**
 * @Author RenPu
 * @Date 2021/9/20 21:44
 * @Version 1.0
 * @Description:
 **/
public class MyFail implements Comtable<String, Integer> {


    @Override
    public Integer compter(String arg) throws IOException, InterruptedException {
        double random = Math.random();
        if (random > 0.5) {
            throw new IOException("读取文件出错！！！！");
        }
        Thread.sleep(3000);
        return Integer.valueOf(arg);
    }
}
